The present invention pertains generally to the field of image processing, and more precisely to the coding and to the decoding of digital images and of sequences of digital images.
Digital images and sequences of digital images are known to occupy a great deal of memory space, thus making it necessary, when these images are transmitted, to compress them so as to avoid problems of crowding on the communication network used for this transmission, the bit rate usable on the latter generally being limited.
The H.264/MPEG-4 AVC standard (the initials standing for “Advanced Video Coding”), such as presented in the document ISO/IEC 14496-10, describes in particular a technique according to which groups of pixels, called blocks or macroblocks, of a current, image are predicted spatially with respect to other blocks or macroblocks belonging to the same image. This is what is called Intra coding (or “Intra-frame-coding”). After this predictive coding, the blocks of pixels are transformed, and then quantized. The coefficients of the quantized blocks of pixels are thereafter traversed in an order of reading making it possible to utilize the significant number of zero coefficients in the high frequencies, and are then coded by an entropy coding.
More precisely, during the predictive coding of a macroblock in accordance with the aforementioned standard, with the exception of a macroblock of 16×16 type, the macroblock is generally split according to a plurality of partitions generally having the form of blocks of smaller size and whose contour is rectangular or square. The spatial prediction of such a macroblock in an image consists in predicting each block of smaller size forming this macroblock with respect to one or more blocks of another macroblock of this same image, called a reference macroblock. This prediction is possible only if the reference macroblock neighbors the macroblock to be predicted and is situated in certain predetermined directions with respect to it, that is to say generally above and to the left, in a so-called “causal” neighborhood.
Thus for example, in the case of a macroblock of 16×16 type, the prediction of the pixels which are situated at the bottom, to the right of this macroblock, is necessarily performed with respect to reference pixels which are situated above and to the left of the macroblock. Such reference pixels are very distant spatially from the pixels to be predicted.
The accuracy of such a type of prediction is therefore not optimized, especially in the case of macroblocks having high spatial activity, that is to say in the case where the image to be coded exhibits numerous details.
Furthermore, such a type of prediction lacks flexibility since, to predict the pixels of one and the same partition, it makes it necessary to choose:                reference pixels that are always grouped together in the form of a block or macroblock and often having the same number, these reference pixels not necessarily being adapted for predicting partitions having a different form from that of a rectangle or square,        always the same reference pixel or pixels whatever the current partition to be predicted, for a predetermined mode of prediction,        always the same reference partition or partitions, whose large spatial distancing with respect to some of the pixels of the partition to be predicted may be detrimental to the accuracy of the prediction,        always the same direction or directions of prediction, without taking account of the particular positioning of each pixel of the partition to be predicted.        
The present invention is aimed at solving the drawbacks of the prior art by providing a prediction method and device which, for each pixel to be predicted, allows customization of its prediction, with the aim of optimizing the accuracy of the prediction of each pixel.